<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta name="author" content="JFinal">
    <meta name="keywords" content="基于jfinal enjoy模板引擎导出MySQL数据库表结构">
    <meta name="description" content="基于jfinal enjoy模板引擎导出MySQL数据库表结构">

    <title>数据库表结构</title>
    <style type="text/css">
			table.tableShow{
				color:#666;
			    border:1px solid #cad9ea;
			 	table-layout:automatic;
			    empty-cells:show;
			    border-collapse: collapse;
			    margin:0 auto;
			 	cursor:default;
			}
			table.tableShow th {
				font-weight: bold;
				color: #4D647C;
			    background: #E5EDF9;
			    height:30px;
			    word-break:keep-all;
			    white-space:nowrap;
			    border:1px solid #cad9ea;
			    padding:0 1em 0;
			}
			table.tableShow td{
			    height:25px;
			    border:1px solid #cad9ea;
			    padding:0 1em 0;
			}
			table.tableShow tr:hover{
			    background: #FFFF99;
			}
			.primarykey {
				color:red;
				font-weight:bold;
			}
		</style>
</head>

<body>
<table id="all" class="tableShow">
    #for(tb : tables)
    <tr>
        <th colspan="6" class="tableRow">
            #if(tb.remark)
            #(tb.remark)：
            #end
            #(tb.tableName)
            #if(tb.primaryKey)
            （主键：#(tb.primaryKey)）
            #end
        </th>
    </tr>
    <tr class="tableTitle">
        <th>序号</td>
        <th>字段名</td>
        <th>类型</td>
        <th>是否允许为空</td>
        <th>默认值</td>
        <th>说明</td>
    </tr>
    #for(col : tb.columns)
    <tr>
        <td>#(for.count)</td>
        <td #if(col.primaryKey)class="primarykey"#end>#(col.columnName) #if(col.primaryKey)(PK)#end</td>
        <td>#(col.columnType)</td>
        <td>#(col.nullable)</td>
        <td>#(col.defaultValue)</td>
        <td>#(col.remark)</td>
    </tr>
    #end
    #end
</table>
</body>
</html>